<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<!-- saved from url=(0043)http://localhost:8080/mango/cart/list.jhtml -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<title>我的订单</title>
<link href="${pageContext.request.contextPath}/css/common.css" rel="stylesheet" type="text/css"/>
<link href="${pageContext.request.contextPath}/css/cart.css" rel="stylesheet" type="text/css"/>

</head>
<body>
<!-- 静态导入菜单栏 -->
	<%@include file="/WEB-INF/jsp/menu.jsp" %>

<div class="container cart">
	<s:if test="pb.data.size() != 0">
		<div class="span24">
		
			<div class="step step1">
				<ul>
					
					<li  class="current"></li>
					<li  style="padding-left: 20%"><strong>我的订单</strong></li>
				</ul>
			</div>
	
		
				<table>
					<tbody>
					<s:iterator value="pb.data" var="o">
					<tr>
						<th colspan="5">订单编号:<s:property value="#o.oid"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							订单状态:
							<s:if test="#o.state == 1">
								<a href="${pageContext.request.contextPath }/order_findByOid?oid=<s:property value="#o.oid"/>"><font color="red">未付款</font></a>
							</s:if>
							<s:if test="#o.state == 2">
								<a >已付款</a>
							</s:if>
							<s:if test="#o.state == 3">
								<a href="${pageContext.request.contextPath }/order_updateState?oid=<s:property value="#o.oid"/>"><font color="red">确定收货</font></a>
							</s:if>
							<s:if test="#o.state == 4">
								<a >交易完成</a>
							</s:if>
						</th>
					</tr>
					<s:iterator value="#o.items" var="oitems">
					<tr>
						<th>图片</th>
						<th>商品</th>
						<th>价格</th>
						<th>数量</th>
						<th>小计</th>
					</tr>
						<tr>
							<td width="60">
								<input type="hidden" name="id" value="22"/>
								<img src="/images/<s:property value="#oitems.product.image"/>"/>
							</td>
							<td>
								<a target="${pageContext.request.contextPath }/order_findByPid?pid=<s:property value="#oitems.product.pid"/>"><s:property value="#oitems.product.pname"/></a>
							</td>
							<td>
								<s:property value="#oitems.product.shop_price"/>
							</td>
							<td class="quantity" width="60">
								<s:property value="#oitems.count"/>
							</td>
							<td width="140">
								<span class="subtotal">￥<s:property value="#oitems.subtotal"/></span>
							</td>
						</tr>
					</s:iterator>
					</s:iterator>
					<tr>
						<td colspan="5">
								<div class="pagination">
		<span>第<s:property value = "pb.pageNumber"/>/<s:property value = "pb.page"/></span>
			<s:if test="pb.pageNumber != 1">
				<a href="${pageContext.request.contextPath}/order_findByUid?pageNumber=1" class="firstPage">&nbsp;</a>
				<a href="${pageContext.request.contextPath}/order_findByUid?pageNumber=<s:property value="pb.pageNumber-1"/>" class="previousPage">&nbsp;</a>
			</s:if>
			
			<s:iterator  var="n" begin="1" end="pb.page">
				<s:if test="pb.pageNumber != #n">
					<a href="${pageContext.request.contextPath}/order_findByUid?pageNumber=<s:property value="#n"/>"><s:property value="#n"/></a>
				</s:if>
				<s:else>
					<span class="currentPage"><s:property value="#n"/></span>
				</s:else>
			</s:iterator>
			<s:if test="pb.pageNumber != pb.page">				
				<a class="nextPage" href="${pageContext.request.contextPath}/order_findByUid?pageNumber=<s:property value="pb.pageNumber+1"/>">&nbsp;</a>
				<a class="lastPage" href="${pageContext.request.contextPath}/order_findByUid?pageNumber=<s:property value="pb.page"/>">&nbsp;</a>
			</s:if>
		
	</div>
						</td>
					</tr>
				</tbody>
			</table>
		
	</div>
	</s:if>
	<s:else>
		<div>
				<div style="padding-left: 35%;padding-top: 2%;">
					<span style="padding-left: 40%"><h2>亲，您尚未有订单,快去购物吧！!</h2></span>				
					<img alt="尚未有订单" src="${pageContext.request.contextPath }/images/timg.jpg">	
				</div>
			</div>
	</s:else>
	</div>
<div class="container footer">
	<div class="span24">
		<div class="footerAd">
					<img src="image\r___________renleipic_01/footer.jpg" alt="我们的优势" title="我们的优势" height="52" width="950">
</div>
</div>
	<div class="span24">
		<ul class="bottomNav">
					<li>
						<a href="#">关于我们</a>
						|
					</li>
					<li>
						<a href="#">联系我们</a>
						|
					</li>
					<li>
						<a href="#">诚聘英才</a>
						|
					</li>
					<li>
						<a href="#">法律声明</a>
						|
					</li>
					<li>
						<a>友情链接</a>
						|
					</li>
					<li>
						<a target="_blank">支付方式</a>
						|
					</li>
					<li>
						<a target="_blank">配送方式</a>
						|
					</li>
					<li>
						<a >SHOP++官网</a>
						|
					</li>
					<li>
						<a>SHOP++论坛</a>
						
					</li>
		</ul>
	</div>
	<div class="span24">
		<div class="copyright">Copyright © 2005-2015 网上商城 版权所有</div>
	</div>
</div>
</body>
</html>